package com.eazyshop.search.listener;

import com.eazyshop.search.controller.SkuController;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoodsOffShelfListener {

    @Autowired
    private SkuController skuController;
    @RabbitListener(queues = "goods_off_queue")
    public void productRemovalMonitoring(String message){

        skuController.deleteGoodsBySpuId(message);
        System.out.println("商品从es索引库中删除");

    }
}
